package org.example.seckilljava.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.example.seckilljava.entity.SeckillRecord;

@Mapper
public interface SeckillRecordMapper extends BaseMapper<SeckillRecord> {
    @Insert("insert into t_seckill_record (`sec_num`,`user_id`,`goods_id`,`order_num`,`price`, `status`)" +
            "values (#{record.secNum},#{record.userId},#{record.goodsId},#{record.orderNum},#{record.price},#{record.status})")
    void save(@Param("record") SeckillRecord record);
}